package com.scwatch.core.domain;

import javax.persistence.*;

@Entity
@Table(name = "cms_chatroom")
public class Chatroom implements java.io.Serializable{
    private static final long serialVersionUID = 1L;

    private Integer id;
//    private LiveBroadcast liveBroadcast;
    private String spokesperson;
    private String content;

    @Id
    @Column(name = "f_chatroom_id", unique = true, nullable = false)
    @TableGenerator(name = "tg_cms_chatroom", pkColumnValue = "cms_chatroom", initialValue = 1, allocationSize = 10)
    @GeneratedValue(strategy = GenerationType.TABLE, generator = "tg_cms_chatroom")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(name = "f_spokesperson")
    public String getSpokesperson() {
        return spokesperson;
    }

    public void setSpokesperson(String spokesperson) {
        this.spokesperson = spokesperson;
    }

    @Column(name = "f_content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

//    @ManyToOne(fetch = FetchType.LAZY)
//    @Column(name = "f_live_broadcast_id",nullable = false)
//    public LiveBroadcast getLiveBroadcast() {
//        return liveBroadcast;
//    }
//
//    public void setLiveBroadcast(LiveBroadcast liveBroadcast) {
//        this.liveBroadcast = liveBroadcast;
//    }
}
